# config valid only for current version of Capistrano
lock "3.8.0"

set :application, "NiMoStore"
set :repo_url, "git@gitee.com:IAmOne/photography.git"

# Default branch is :master
ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp

# Default deploy_to directory is /var/www/my_app_name
# set :deploy_to, "/var/www/my_app_name"

# Default value for :format is :airbrussh.
# set :format, :airbrussh

# You can configure the Airbrussh format using :format_options.
# These are the defaults.
# set :format_options, command_output: true, log_file: "log/capistrano.log", color: :auto, truncate: :auto

# Default value for :pty is false
# set :pty, true

# Default value for :linked_files is []
append :linked_files, ".env"

# Default value for linked_dirs is []
append :linked_dirs, "storage/logs"

# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }

# Default value for keep_releases is 5
# set :keep_releases, 5


set :migrate_roles, :db
set :queue_roles, :queue

namespace :deploy do
  after 'deploy:symlink:shared', 'composer:install'
  after 'composer:install', 'bash:chown'
  after 'bash:chown', 'laravel:migrate'
  after 'deploy:symlink:release', 'laravel:restart_queue'
  after 'laravel:restart_queue', 'bash:restart_php'
end